#include "component/ColliderCapsule.h"
#include "GameObject.h"




using namespace Boon;

GameObject::RegisterCreationCB<ColliderCapsule> cc;


Boon::Bounds Boon::ColliderCapsule::GetBounds() const
{
	float d = m_Radius * 2.0f;
	return Bounds( GetGameObject().GetTransform().GetPosition(), Vector3( d, m_Height, d ) );
}

ColliderType Boon::ColliderCapsule::GetType() const
{
	return CT_CAPSULE;
}

void Boon::ColliderCapsule::OnCreate()
{
	m_Height = 1.0f;
	m_Radius = .5f;
	Collider::OnCreate();
}
